package DAO;

import java.util.Date;

import model.impl.Passenger;

/**
 *  PassengerDAO interface, extend GenericDAO interface using as parameters
 *  entity of Passenger and Integer class as an ID. It also adds some specific 
 *  to Passenger entity methods.
 */
public interface PassengerDAO extends GenericDAO<Passenger, Integer> {
	
	/**
	 * Looks for a Passenger with the passenger's instances equals to the 
	 * given parameters
	 * 
	 * @param name 		- Passenger.passengerName
	 * @param surname	- Passenger.passengerSurname
	 * @param data		- Passenger.passengerDateOfBirth
	 * @return			- Passenger entity object or null if such object was
	 * 				 	  not found
	 */
	public Passenger findPassengerByNameData(String name, String surname, Date data);
	
	/**
	 * Looks for a Passenger with the passenger's instances equals to the 
	 * given parameters
	 * 
	 * @param login	- Passenger.login
	 * @return		- Passenger entity object or null if such object was
	 * 				  not found
	 */
	public Passenger findPassengerByLogin(String login);
	
	/**
	 * Looks for a Passenger with the passenger's instances equals to the 
	 * given parameters
	 * 
	 * @param login		- Passenger.login
	 * @param password	- Passenger.password
	 * @return			- Passenger entity object or null if such object was
	 * 				 	  not found
	 */
	public Passenger findPassengerByLoginPassword(String login, String password);
}
